#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
  // 计算数列的和
  double a = 2;
  double b = 1;
  int n = 20;
  double sum = 0;
  double t = 0;
  for (int i = 1; i <= n; i++) {
    sum += a / b;
    t = a;
    a = a + b;
    b = t;
  }
  printf("%lf", sum);

  return EXIT_SUCCESS;
}
